package com.bbird.od.finance;

import com.bbird.od.finance.controller.MainController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

/**
 * @author ziyang Kuang
 * @date 2021/04/30
 * @describe
 */
public class Main extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        FXMLLoader fx = new FXMLLoader();
        fx.setLocation(Thread.currentThread().getContextClassLoader().getResource("mainStore.fxml"));
        Parent root = fx.load();

        MainController mainController = fx.getController();
        mainController.initPaneMap();

        Scene scene = new Scene(root);

        primaryStage.setScene(scene);
        primaryStage.getIcons().add(new Image("img/icon.png"));
        primaryStage.show();

    }
}
